﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'ReporteClientesJuridicos')
	BEGIN
		DROP  Procedure  ReporteClientesJuridicos
	END

GO

CREATE Procedure ReporteClientesJuridicos

	(
		@nombre nvarchar(50)
	)


AS
begin
SELECT     dbo.Cliente.Direccion,
           dbo.Cliente.Telefono,
           dbo.Juridico.RazonSocial,
           dbo.Juridico.RUC,
           dbo.Juridico.GiroNegocio
FROM       dbo.Cliente INNER JOIN
           dbo.Juridico ON dbo.Cliente.IdCliente = dbo.Juridico.IdCliente
           where dbo.Juridico.RazonSocial like @nombre +'%' 
end
GO

GRANT EXEC ON ReporteClientesJuridicos TO PUBLIC

GO


